
    <!DOCTYPE html>
    <html lang="zh-CN">
    <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>你们的项目为什么选择 Gateway 作为微服务网关？ - 学习卡片</title>
      <style>
        body { font-family: sans-serif; background-color: #f0f8ff; color: #333; display: flex; flex-direction: column; align-items: center; padding: 50px 20px; }
        .header h1 { font-size: 32px; }
        .grid-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; width: 100%; max-width: 1200px; }
        .card-container { perspective: 1200px; cursor: pointer; height: 250px; }
        .card { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform 0.7s; border-radius: 16px; box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
        .card-container.flipped .card { transform: rotateY(180deg); }
        .card-face { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; display: flex; flex-direction: column; box-sizing: border-box; border-radius: 16px; background-color: #fff; padding: 24px; }
        .card-back { background-color: #f0fff4; transform: rotateY(180deg); justify-content: space-between; }
        .card-category { font-size: 14px; color: #0052d9; margin-bottom: 8px; font-weight: 500; }
        .card-question { font-size: 20px; font-weight: 500; flex-grow: 1; display: flex; align-items: center; justify-content: center; text-align: center; }
        .card-answer-wrapper { flex-grow: 1; overflow-y: auto; }
        .card-answer { font-size: 15px; line-height: 1.7; }
        .card-footer { font-size: 13px; color: #8a919f; border-top: 1px solid #f0f0f0; padding-top: 16px; margin-top: 16px; }
        .card-source { font-size: 13px; color: #8a919f; border-top: 1px solid #f0f0f0; padding-top: 12px; margin-top: 12px; }
      </style>
    </head>
    <body>
      <div class="header">
        <h1>你们的项目为什么选择 Gateway 作为微服务网关？ - 学习卡片</h1>
      </div>
      <div class="grid-container">
        
    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">理论</div>
          <div class="card-question">为什么 Spring Cloud Gateway 是微服务网关的一个理想选择？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">理论</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">因为它能够与 Spring 技术栈无缝集成，提供灵活的路由和负载均衡功能，支持强大的过滤器机制，易于扩展和定制，并享有活跃的社区支持。其响应式编程支持也使其能很好地处理高并发需求。</div>
          </div>
          <div class="card-source">来源: 文档引言部分</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">特性</div>
          <div class="card-question">Spring Cloud Gateway 如何与 Spring 生态系统实现无缝集成？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">特性</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">Spring Cloud Gateway 能够很好地配合其他 Spring 组件，例如 Spring Security、Spring Cloud Config 和 Spring Cloud Sleuth。</div>
          </div>
          <div class="card-source">来源: 1. 集成与兼容性</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">功能</div>
          <div class="card-question">在路由配置方面，Spring Cloud Gateway 提供了哪些灵活性来满足复杂需求？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">功能</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">它提供了强大的路由功能，可以根据请求的 URI、请求头、参数等进行灵活路由，并且支持动态路由、断言和过滤器。</div>
          </div>
          <div class="card-source">来源: 2. 路由和负载均衡</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">机制</div>
          <div class="card-question">面对高并发请求，Spring Cloud Gateway 使用什么机制来提高系统的可靠性与性能？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">机制</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">它内置了对负载均衡的支持，可以将请求均匀地分发到后端的多个服务实例。</div>
          </div>
          <div class="card-source">来源: 2. 路由和负载均衡</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">功能</div>
          <div class="card-question">Spring Cloud Gateway 中的过滤器功能主要用于实现哪些自定义处理？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">功能</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">过滤器可用于在网关层执行高度自定义的处理，包括修改请求和响应、进行数据加密解密以及日志记录等。</div>
          </div>
          <div class="card-source">来源: 3. 过滤器功能</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">技术</div>
          <div class="card-question">用户可以通过哪些方式来扩展和定制 Spring Cloud Gateway 的功能以满足特定业务需求？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">技术</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">用户可以通过自定义过滤器（Filters）、断言（Predicates）和路由规则来灵活地扩展和定制网关功能。</div>
          </div>
          <div class="card-source">来源: 4. 易于扩展和定制</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">机制</div>
          <div class="card-question">Spring Cloud Gateway 基于何种编程模型？该模型如何帮助其处理高并发请求？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">机制</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">它基于响应式编程模型，并与 Spring WebFlux 无缝集成，这种模型能够有效地处理高并发请求，非常适合现代微服务架构。</div>
          </div>
          <div class="card-source">来源: 5. 支持现代技术栈</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">技术</div>
          <div class="card-question">为了便于对网关进行实时监控和管理，Spring Cloud Gateway 可以与哪个组件进行集成？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">技术</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">它可以与 Spring Boot Admin 进行集成，从而实现对网关的实时监控和管理，帮助开发人员及时发现和解决问题。</div>
          </div>
          <div class="card-source">来源: 7. 管理和监控</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">理论</div>
          <div class="card-question">作为一个 Spring 项目，拥有活跃的社区支持为 Spring Cloud Gateway 带来了哪些优势？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">理论</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">广泛的社区支持和定期的更新确保了该技术的成熟度和安全性。</div>
          </div>
          <div class="card-source">来源: 6. 社区支持和活跃度</div>
        </div>
      </div>
    </div>

      </div>
    </body>
    </html>
